gl: Check allowed APIs in realize()
authorBenjamin Otte <otte@redhat.com>
Thu, 7 Oct 2021 20:10:39 +0000 (22:10 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 8 Oct 2021 01:31:07 +0000 (03:31 +0200)
commitf584d4f500255e13a58d94d2748290db3622a46e
tree4e3cd8c998de2f311a4ec33d7424903327b17eb9
parent8c1f7f7531a98fc6e87c3389a675c7a1648c9b97
gl: Check allowed APIs in realize()

Add gdk_gl_context_is_api_allowed() for backends and make them use it.

Finally, have them return the final API as the return value (or 0 on
error).

And then use that api instead of a use_es boolean flag.

Fixes #4221
gdk/gdk.c
gdk/gdkglcontext.c
gdk/gdkglcontextprivate.h
gdk/macos/gdkmacosglcontext.c
gdk/win32/gdkglcontext-win32-wgl.c
gdk/x11/gdkglcontext-glx.c